<template>
  <div class="slide-bar">
    <div v-for="(item, idx) in list" :key="item.areaId" @click="itemClick(idx)">
      <cell
        :idx="idx"
        :class="{ active: actived == idx }"
      >
        <span slot="title">{{ item.areaName }}</span>
      </cell>
    </div>
  </div>
</template>

<script>
import Cell from "components/content/Cell.vue";

export default {
  name: "SlideBar",
  props: ["list", "actived"],
  methods: {
    itemClick(idx) {
      this.$emit("switchCategory", idx);
    },
  },
  components: {
    Cell,
  },
};
</script>

<style>
</style>